<template>
  <div id="app">
    <Header></Header>
    <router-view></router-view>
    <Footer v-if="!$route.meta.isHiddenFooter"></Footer>
  </div>
</template>

<script>
import Header from "./components/Header/Header.vue"
import Footer from "./components/Footer/Footer.vue"

export default {
  name: "App",
  components: {
    Header,
    Footer,
  },
  mounted() {
    // console.log(this.$store)
    // console.log(this)
    // 优化发送请求的方式，在APP中来触发请求 ，只发一次
    // this.getCategoryListData()
    // 需要加个home,模块化情况下,需要先写模块名称,在加事件名
    this.$store.dispatch("home/getCategoryListData")
  },
}
</script>

<style>
/* #app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}  */
</style>
